another pvs studio find
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Fri, 19 Mar 2021 21:02:28 +0000 (15:02 -0600)
committertsteven4 <13596209+tsteven4@users.noreply.github.com>
Fri, 19 Mar 2021 21:02:28 +0000 (15:02 -0600)
↑ V547 Expression is always false.

raymarine.cc

index 827f2c38e1cefb72440d1ccd79b436fc97b5bd21..2ae07a2c30f7f5a9e93d8f18852342199a99834e 100644 (file)
@@ -219,7 +219,7 @@ raymarine_read()
     if (!str.isEmpty()) {
       unsigned int symbol = str.toInt();
 
-      if ((symbol < 3) && (symbol >= RAYMARINE_SYMBOL_CT)) {
+      if ((symbol < 3) || (symbol >= RAYMARINE_SYMBOL_CT)) {
         symbol = RAYMARINE_STD_SYMBOL;
       }
       wpt->icon_descr = raymarine_symbols[symbol].name;